1. Field of the Invention
The present invention relates to a quantizing apparatus and method for quantizing the difference between an input signal (such as a digital audio signal or a digital picture signal) and a predicted value generated therefrom.
2. Description of the Related Art
A prediction encoding method for compressing the transmission information amount of a digital audio signal, a digital picture signal, and so forth is known. For example, in one-dimensional DPCM, the difference between an input sample value and a predicted value is formed in time direction. On the other hand, in two-dimensional DPCM, the difference between an input sample value and a predicted value is formed in spatial direction. Since a digital information signal has a correlation in time direction and in spatial direction, the difference concentrates on around 0. Thus, the difference signal can be quantized with the number of bits smaller than the number of quantizing bits. Consequently, the information amount can be reduced. In addition, when the variable length encoding process is performed using the characteristic of the concentration of the distribution of the difference signal, the information amount can be more reduced.
In the distribution of the frequency of the difference signal, values concentrate on around 0. Thus, in a conventional quantizing apparatus that deals with the difference signal, the quantizing step width at around 0 is finely designated. As the level becomes large, the quantizing step width is coarsely designated. This quantizing apparatus is referred to as a non-linear quantizing apparatus. In the conventional quantizing apparatus including the non-linear quantizing apparatus, all possible levels of the difference signal are quantized. For example, when one sample (one pixel) of a digital picture signal is quantized with eight bits, the values of the difference signal range from -255 to +255. In the conventional quantizing apparatus, all the range is used for the quantizing process.
In the conventional quantizing apparatus, the number of quantizing steps is restricted to even numbers so as to represent quantized values in binary notation. In the case that the number of quantizing steps is restricted to even numbers, when difference data is quantized with 0 as a decoded value, the quantized values are not symmetrical with respect to 0. Alternatively, even if the number of quantizing steps is 2n-1, since 2n should be used as the number of quantizing steps, there is a loss.
When the number of quantizing bits is changed from 2 to 3, the number of quantizing steps is increased from 4 to 8. Thus, as this example shows, the number of quantizing steps largely varies corresponding to the number of quantizing bits. This means that the variation of the number of quantizing bits for keeping the transmission data amount constant causes the quantizing step width to largely vary, thereby largely changing the restored picture quality.